package shiqi.db;

import java.util.List;

/**
 * @program: ascend
 * @description: 数据库模板类
 * @author: shiqi
 * @create: 2022-03-17 16:20
 **/
public interface Db<T, E> {
    
    /**
     * @author shiqi
     * @createTime 2022/3/17 16:21
     * @desc 初始化数据
     * @param  
     * @return void
     */
    void initData();

    /**
     * @author shiqi
     * @createTime 2022/3/17 16:32
     * @desc 搜索
     * @param  t
     * @return T
     */
    T search(T t) throws IllegalAccessException;

    /**
     * @author shiqi
     * @createTime 2022/3/17 20:22
     * @desc 根据传入的id进行搜索
     * @param id
     * @return T
     */
    T searchById(E id);
}
